/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.services.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Bayu
 */
@Entity
@Table(name = "pfrekap")
@NamedQueries({@NamedQuery(name = "Pfrekap.findAll", query = "SELECT p FROM Pfrekap p"), @NamedQuery(name = "Pfrekap.findById", query = "SELECT p FROM Pfrekap p WHERE p.id = :id"), @NamedQuery(name = "Pfrekap.findByBulan", query = "SELECT p FROM Pfrekap p WHERE p.bulan = :bulan"), @NamedQuery(name = "Pfrekap.findByTahun", query = "SELECT p FROM Pfrekap p WHERE p.tahun = :tahun"), @NamedQuery(name = "Pfrekap.findByPcsday", query = "SELECT p FROM Pfrekap p WHERE p.pcsday = :pcsday"), @NamedQuery(name = "Pfrekap.findByPcscumm", query = "SELECT p FROM Pfrekap p WHERE p.pcscumm = :pcscumm")})
public class Pfrekap implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "bulan")
    private int bulan;
    @Basic(optional = false)
    @Column(name = "tahun")
    private int tahun;
    @Basic(optional = false)
    @Column(name = "pcsday")
    private double pcsday;
    @Basic(optional = false)
    @Column(name = "pcscumm")
    private double pcscumm;

    public Pfrekap() {
    }

    public Pfrekap(Long id) {
        this.id = id;
    }

    public Pfrekap(Long id, int bulan, int tahun, double pcsday, double pcscumm) {
        this.id = id;
        this.bulan = bulan;
        this.tahun = tahun;
        this.pcsday = pcsday;
        this.pcscumm = pcscumm;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getBulan() {
        return bulan;
    }

    public void setBulan(int bulan) {
        this.bulan = bulan;
    }

    public int getTahun() {
        return tahun;
    }

    public void setTahun(int tahun) {
        this.tahun = tahun;
    }

    public double getPcsday() {
        return pcsday;
    }

    public void setPcsday(double pcsday) {
        this.pcsday = pcsday;
    }

    public double getPcscumm() {
        return pcscumm;
    }

    public void setPcscumm(double pcscumm) {
        this.pcscumm = pcscumm;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pfrekap)) {
            return false;
        }
        Pfrekap other = (Pfrekap) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bayu.services.entity.Pfrekap[id=" + id + "]";
    }

}
